package org.jslaughter.event.eventtype;

import org.nvframe.event.AbstractEvent;
import org.nvframe.event.EventListener;

/**
 * 
 * @author Nik Van Looy
 */
public class StatsEvent extends AbstractEvent {

	private static Class<? extends EventListener> listener = StatsListener.class;
	
	private String statId;

	public StatsEvent(String statId) {
		// set event-specific properties
		this.statId = statId;
	}
	
	public void dispatchToListener(EventListener listener) {
		((StatsListener) listener).statsChanged(this);
	}

	public String getStatId() {
		return statId;
	}

	@Override
	protected Class<? extends EventListener> getListener() {
		return listener;
	}

}
